7c9d63f0ee60a2968515f94dde5ea0ed97bbd1c0,src/com/avail/descriptor/ParseNodeTypeDescriptor.java,ParseNodeTypeDescriptor,o_TypeUnionOfParseNodeType,#AvailObject#A_Type#,730
Before Change
final A_Type aParseNodeType)
{
final ParseNodeKind myKind = object.parseNodeKind();
final ParseNodeKind otherKind = aParseNodeType.parseNodeKind();
final A_Type myExpressionType = object.slot(EXPRESSION_TYPE);
final A_Type otherExpressionType = aParseNodeType.expressionType();
if (myKind.isSubkindOf(otherKind)
&& myExpressionType.isSubtypeOf(otherExpressionType))
{
return aParseNodeType;
}
if (otherKind.isSubkindOf(myKind)
&& otherExpressionType.isSubtypeOf(myExpressionType))
{
return object;
}
final ParseNodeKind ancestorKind = myKind.commonAncestorWith(otherKind);
return ancestorKind.create(
After Change
{
final ParseNodeKind unionKind =
object.parseNodeKind().commonAncestorWith(
aParseNodeType.parseNodeKind());
return unionKind.createNoCheck(
object.slot(EXPRESSION_TYPE).typeUnion(
aParseNodeType.expressionType()));